There is a lot of cleaning that needs to be done before the highscores can be read into a pandas dataframe, not all of which can be done programmatically.
I started by taking a copy of the HighScores.vcd file (may appear as a .dat file), opening it with Notepad (PSPad will open it in the hex editor) and saving it as HighScores.txt. Manually I delete everything down as far as the first occurance of ===, this looks something like: Assembly-CSharpXRL.Core.ScoreboardScores�System.Collections.Generic.List`1[[XRL.Core.ScoreEntry, Assembly-CSharp....
There are a number of symbols which will prevent the file being read into ipython fully or will cause trouble when writing the data to file and these need to be deleted manually as well. These symbols are included in notes.txt, which should be opened in Notepad, and these can be removed by using Edit -> Replace. There is also a circle shape that needs to be removed, which can be hard to find. This is usually the symbol for the bits that make up an artifact, so it may be best to delete everything between a < >. If going through this code using your own highscores you may have to manually delete more lines or symbols.
After all that the file can finally be read in!
#This is what the HighScores file now looks like
qud = open("HighScores.txt", "r")
print qud.read()
qud.close()
=== Game summary for &WGoethe II&y === Game ended Thursday, August 13, 2015 at 6:04:58 PM Goethe II died on the 20th of Uru Ux. from &yWahmahcalcalit&y's lase beam! (x2) Scored &C48753&y points Survived for 35235 turns. Visited 260 zones. Generated 1 storied items. Most advanced artifact in possession: HE Missile&y < � = �=== Game summary for &WKant XVIII&y === Game ended Sunday, August 30, 2015 at 7:34:00 PM Kant XVIII died on the 27th of Tuum Ut. The &ychute crab&y hits &w(x1)&y for 2 damage with his &Ycrab claw ->&y7 &r&y1d2&y!&y [7] Scored &C40178&y points Survived for 37145 turns. Visited 222 zones. Generated 1 storied items. Most advanced artifact in possession: Fix-It spray foam x2&y = LP > �=== Game summary for &WO`Brien III&y === Game ended Wednesday, September 02, 2015 at 3:50:10 AM O`Brien III died on the 6th of Tebet Ux. The &rbloody&y &MKumukokumu the Stylish, &Mlegendary &Mogre ape&y&y hits &M(x8)&y for 51 damage with his &Yape fist &c ->&y20 &r&y3d3&y!&y [10] Scored &C20556&y points Survived for 21114 turns. Visited 130 zones. Most advanced artifact in possession: force bracelet &b&y0 &K &y0 &y<&b&c&R&B&y> &y[&Kno cell&y]&y > �B ? �=== Game summary for &WKant XII&y === Game ended Friday, August 28, 2015 at 11:14:48 PM Kant XII died on the 7th of Iyur Ut. &YPutus Templar warden&y hits &w(x1)&y for 3 damage with his &Bfolded carbide&y long sword ->&y9 &r&y2d5&y!&y [20] Scored &C17061&y points Survived for 17066 turns. Visited 118 zones. Most advanced artifact in possession: &Welectro&cbow &y<&g&c&G&G&y> ->&y10 &r&y1d6 &y[&Kno cell&y]&y ? �@ @ �=== Game summary for &WNietzsche III&y === Game ended Wednesday, August 05, 2015 at 8:00:46 PM Nietzsche III died on the 19th of Tishru ii Ux. The &Yeyeless king crab&y hits &M(x6)&y for 20 damage with his &Ymassive king crab claw ->&y20 &r&y1d6&y!&y [11] Scored &C16607&y points Survived for 16124 turns. Visited 115 zones. Most advanced artifact in possession: &cu&gb&Ge&Wr&wn&co&Cs&Gt&gr&wu&Wm&y injector &y<&K&C&y>&y @ �& A � === Game summary for &WKant XI&y === Game ended Thursday, August 27, 2015 at 11:14:09 PM Kant XI died on the 12th of Uru Ux. from the scalding steam! Scored &C9971&y points Survived for 11105 turns. Visited 60 zones. Most advanced artifact in possession: Fix-It spray foam&y A � B �=== Game summary for &WKant VIII&y === Game ended Thursday, August 27, 2015 at 8:01:17 PM Kant VIII died on the 23rd of Tishru i Ux. from the scalding steam! Scored &C7848&y points Survived for 7719 turns. Visited 35 zones. Most advanced artifact in possession: Fix-It spray foam&y B -> C �=== Game summary for &WKant V&y === Game ended Saturday, August 22, 2015 at 6:22:36 PM Kant V died on the 28th of Tishru i Ux. Scored &C6662&y points Survived for 8118 turns. Visited 47 zones. Most advanced artifact in possession: semi-automatic pistol x2 &y<&b&G&G&B&C&y> ->&y8 &r&y1d6 &y[&KEmpty&y]&y _ D �=== Game summary for &WO`Brien II&y === Game ended Wednesday, September 02, 2015 at 12:53:32 AM O`Brien II died on the 23rd of Nivvun Ut. from &yDuhmahcaluhcal&y's lase beam! (x3) Scored &C5471&y points Survived for 6356 turns. Visited 42 zones. Most advanced artifact in possession: &cstun &cgas grenade mk I&y D a E �=== Game summary for &WKant XVII&y === Game ended Saturday, August 29, 2015 at 1:44:21 AM Kant XVII died on the 27th of Tishru ii Ux. Scored &C3169&y points Survived for 7239 turns. Visited 37 zones. Most advanced artifact in possession: compass bracelet &b&y0 &K &y0&y E D F �=== Game summary for &WKant&y === Game ended Friday, August 21, 2015 at 11:08:22 PM Kant died on the 12th of Tuum Ut. The giant amoeba&y hits &W(x2)&y for 4 damage with his &Ggiant pseudopod ->&y10 &r&y1d3&y!&y [15] Scored &C2372&y points Survived for 3013 turns. Visited 21 zones. F 9 G �=== Game summary for &WKant XIII&y === Game ended Saturday, August 29, 2015 at 12:05:24 AM Kant XIII died on the 5th of Tebet Ux. The girshling&y hits &w(x1)&y for 6 damage with his claw ->&y2 &r&y1d6&y!&y [12] Scored &C1849&y points Survived for 2853 turns. Visited 18 zones. Most advanced artifact in possession: pump shotgun ->&y8 &r&y1d2 &y[shotgun shell&y]&y G � H �=== Game summary for &WKhrushchev VIII&y === Game ended Sunday, August 02, 2015 at 6:19:47 PM Khrushchev VIII died on the 5th of Tuum Ut. from bleeding! Scored &C1760&y points Survived for 4198 turns. Visited 25 zones. H � I �=== Game summary for &WNietzsche&y === Game ended Tuesday, August 04, 2015 at 8:18:00 PM Nietzsche died on the 17th of Tuum Ut. The &rbloody&y horned chameleon&y hits &w(x1)&y for 4 damage with his Tusks ->&y4 &r&y2d3 &b&y0 &K &y0&y!&y [7] Scored &C1503&y points Survived for 3719 turns. Visited 27 zones. I q J �=== Game summary for &WKant IV&y === Game ended Saturday, August 22, 2015 at 12:00:38 AM Kant IV died on the 28th of Iyur Ut. The snapjaw scavenger&y hits &w(x1)&y for 6 damage with his &Ysteel&y battle axe ->&y3 &r&y1d6&y!&y [18] Scored &C1393&y points Survived for 3347 turns. Visited 16 zones. Most advanced artifact in possession: &Gacid &cgas grenade mk I&y J p K �=== Game summary for &WKhrushchev XI &y === Game ended Monday, August 03, 2015 at 3:18:32 PM Khrushchev XI died on the 20th of Kisu Ux. Scored &C1136&y points Survived for 4121 turns. Visited 21 zones. Most advanced artifact in possession: &rbl&Ra&Wz&Ye&y injector&y K � L �=== Game summary for &WLenin&y === Game ended Saturday, August 01, 2015 at 4:08:30 PM Lenin died on the 13th of Iyur Ut. The equimax&y hits &r(x3)&y for 9 damage with his bite ->&y8 &r&y2d2&y!&y [17] Scored &C902&y points Survived for 1019 turns. Visited 12 zones. L � M �=== Game summary for &WKhrushchev&y === Game ended Sunday, August 02, 2015 at 3:52:52 PM Khrushchev died on the 10th of Tishru ii Ux. The &rbloody&y &MGroubuubu-wof-wofuz, the stalwart Snapjaw Tot-eater&y hits &W(x2)&y for 11 damage with his &bcarbide&y battle axe ->&y5 &r&y2d3&y!&y [22] Scored &C708&y points Survived for 2789 turns. Visited 21 zones. M N �=== Game summary for &WKant X&y === Game ended Thursday, August 27, 2015 at 9:17:34 PM Kant X died on the 8th of Kisu Ux. The cave spider&y hits &w(x1)&y for 2 damage with his fangs ->&y2 &r&y1d2&y!&y [19] Scored &C265&y points Survived for 2287 turns. Visited 16 zones. N � O �=== Game summary for &WO`Brien IV&y === Game ended Wednesday, September 02, 2015 at 12:47:21 PM O`Brien IV died on the Ides of Uru Ux. The salthopper&y hits &r(x3)&y for 7 damage with his &Grending mandibles ->&y11 &r&y1d4&y!&y [15] Scored &C199&y points Survived for 1810 turns. Visited 14 zones. Most advanced artifact in possession: semi-automatic pistol ->&y8 &r&y1d6 &y[&KEmpty&y]&y P �=== Game summary for &WKhrushchev II&y === Game ended Sunday, August 02, 2015 at 4:13:32 PM Khrushchev II died on the 17th of Uru Ux. from bleeding! Scored &C13&y points Survived for 1640 turns. Visited 9 zones. P -> ����Q �=== Game summary for &WStalin&y === Game ended Saturday, August 01, 2015 at 3:28:05 PM Stalin died on the 27th of Uru Ux. The salthopper&y hits &r(x3)&y for 9 damage with his &Grending mandibles ->&y11 &r&y1d4&y!&y [16] Scored &C-71&y points Survived for 3412 turns. Visited 30 zones. Q ����R �=== Game summary for &WKant IX&y === Game ended Thursday, August 27, 2015 at 8:51:15 PM Kant IX died on the 2nd of Iyur Ut. The &gjilted lover&y hits &w(x1)&y for 2 damage with his thorns ->&y5 &r&y1d4&y!&y [16] Scored &C-80&y points Survived for 1807 turns. Visited 13 zones. Most advanced artifact in possession: &Gacid &cgas grenade mk I x2&y R ����S �=== Game summary for &WKhrushchev VI&y === Game ended Sunday, August 02, 2015 at 5:12:49 PM Khrushchev VI died on the 11th of Tuum Ut. from fire ant&y's flames! Scored &C-126&y points Survived for 1705 turns. Visited 21 zones. S ���T �=== Game summary for &WStalin&y === Game ended Saturday, August 01, 2015 at 3:41:26 PM Stalin died on the 1st of Tishru i Ux. from the explosion! Scored &C-224&y points Survived for 1061 turns. Visited 8 zones. ���U �=== Game summary for &WKant VII&y === Game ended Thursday, August 27, 2015 at 4:50:50 PM Kant VII died on the 22nd of Uulu Ut. Scored &C-243&y points Survived for 770 turns. Visited 8 zones. U ����V �=== Game summary for &WKant XIV&y === Game ended Saturday, August 29, 2015 at 12:23:09 AM Kant XIV died on the 29th of Tuum Ut. from bleeding! Scored &C-367&y points Survived for 2230 turns. Visited 14 zones. V N���W �=== Game summary for &WKant XV&y === Game ended Saturday, August 29, 2015 at 12:42:44 AM Kant XV died on the 24th of Nivvun Ut. Scored &C-434&y points Survived for 1332 turns. Visited 10 zones. W ! ����X �=== Game summary for &WKhrushchev&y === Game ended Sunday, August 02, 2015 at 2:13:37 PM Khrushchev died on the 13th of Uru Ux. from bleeding! Scored &C-531&y points Survived for 1863 turns. Visited 17 zones. X " ����Y �=== Game summary for &WNapolen III&y === Game ended Monday, August 03, 2015 at 4:20:16 PM Napolen III died on the 20th of Shwut Ux. from the fire started by dawnglider&y! Scored &C-543&y points Survived for 1773 turns. Visited 16 zones. Y # ����Z �=== Game summary for &WNapoleon&y === Game ended Monday, August 03, 2015 at 3:41:37 PM Napoleon died on the 19th of Uulu Ut. from bleeding! Scored &C-547&y points Survived for 1536 turns. Visited 11 zones. Z $ ����[ �=== Game summary for &WNapoleon II&y === Game ended Monday, August 03, 2015 at 3:57:39 PM Napoleon II died on the 22nd of Tishru i Ux. from bleeding! Scored &C-590&y points Survived for 1298 turns. Visited 11 zones. [ % ����\ �=== Game summary for &WO`Brien V&y === Game ended Wednesday, September 02, 2015 at 12:58:51 PM O`Brien V died on the 17th of Nivvun Ut. Scored &C-618&y points Survived for 1538 turns. Visited 14 zones. \ & q���] �=== Game summary for &WKant VI&y === Game ended Thursday, August 27, 2015 at 4:36:27 PM Kant VI died on the 14th of Shwut Ux. from &Yyoung ivory&y's impalement. Scored &C-911&y points Survived for 613 turns. Visited 7 zones. ] ' j���^ �=== Game summary for &WKhrushchev V&y === Game ended Sunday, August 02, 2015 at 4:45:07 PM Khrushchev V died on the 19th of Uulu Ut. The &rbloody&y salthopper&y hits &R(x4)&y for 10 damage with his &Grending mandibles ->&y10 &r&y1d4&y!&y [8] Scored &C-918&y points Survived for 510 turns. Visited 6 zones. ^ ( X���_ �=== Game summary for &WKhrushchev IV&y === Game ended Sunday, August 02, 2015 at 4:35:26 PM Khrushchev IV died on the 21st of Nivvun Ut. The snapjaw scavenger&y hits &w(x1)&y for 1 damage with his iron dagger ->&y2 &r&y1d4&y!&y [8] Scored &C-936&y points Survived for 1134 turns. Visited 12 zones. _ ) &���` �=== Game summary for &WKant II&y === Game ended Friday, August 21, 2015 at 11:23:56 PM Kant II died on the 12th of Shwut Ux. The &cscrap shoveler&y hits &M(x5)&y for 8 damage with his &cscrap shovel ->&y15 &r&y1d2&y!&y [5] Scored &C-986&y points Survived for 720 turns. Visited 6 zones. ` * ���a �=== Game summary for &WMalenkov&y === Game ended Saturday, August 01, 2015 at 4:35:17 PM Malenkov died on the 14th of Tuum Ut. from snapjaw scavenger&y's explosion! Scored &C-1004&y points Survived for 911 turns. Visited 12 zones. a + ����b �=== Game summary for &WKant XVI&y === Game ended Saturday, August 29, 2015 at 12:46:03 AM Kant XVI died on the 3rd of Uulu Ut. The &rbloody&y equimax&y hits &W(x2)&y for 5 damage with his bite ->&y9 &r&y2d2&y!&y [23] Scored &C-1120&y points Survived for 401 turns. Visited 5 zones. b , ����c �=== Game summary for &WKhrushchev VII&y === Game ended Sunday, August 02, 2015 at 5:17:56 PM Khrushchev VII died on the 27th of Uru Ux. The &rbloody&y &Rsalamander&y hits &w(x1)&y for 3 damage with his bite ->&y3 &r&y1d3&y!&y [8] Scored &C-1127&y points Survived for 403 turns. Visited 5 zones. c - ����d �=== Game summary for &WStalin&y === Game ended Saturday, August 01, 2015 at 2:04:38 PM Stalin died on the 20th of Nivvun Ut. &yUmchuum&y hits &W(x2)&y for 4 damage with his &yUmumerchacal&y!&y [9] Scored &C-1131&y points Survived for 362 turns. Visited 3 zones. Most advanced artifact in possession: &gpoison &cgas grenade mk I&y d . ����e �=== Game summary for &WKhrushchev IX&y === Game ended Monday, August 03, 2015 at 1:56:40 PM Khrushchev IX died on the 18th of Tishru i Ux. from bleeding! Scored &C-1143&y points Survived for 336 turns. Visited 4 zones. e / }���f �=== Game summary for &WMalenkov&y === Game ended Saturday, August 01, 2015 at 4:18:54 PM Malenkov died on the 13th of Tishru i Ux. &MRuf-ohoubub, the stalwart Snapjaw Bear-baiter&y hits &W(x2)&y for 10 damage with his &wbronze&y two-handed sword ->&y4 &r&y1d8&y!&y [10] Scored &C-1155&y points Survived for 687 turns. Visited 8 zones. f 0 m���g �=== Game summary for &WNapoleon IV&y === Game ended Monday, August 03, 2015 at 4:28:33 PM Napoleon IV died on the 25th of Uulu Ut. The salthopper&y hits &W(x2)&y for 5 damage with his &Grending mandibles ->&y10 &r&y1d4&y!&y [11] Scored &C-1171&y points Survived for 275 turns. Visited 4 zones. g 1 j���h �=== Game summary for &WO'Brien&y === Game ended Wednesday, September 02, 2015 at 12:03:29 AM O'Brien died on the 9th of Nivvun Ut. Scored &C-1174&y points Survived for 287 turns. Visited 5 zones. h 2 i���i �=== Game summary for &WNapoleon V&y === Game ended Monday, August 03, 2015 at 4:31:59 PM Napoleon V died on the 22nd of Ubu Ut. from bleeding! Scored &C-1175&y points Survived for 320 turns. Visited 3 zones. i 3 G���j �=== Game summary for &WKhrushchev X&y === Game ended Monday, August 03, 2015 at 1:59:50 PM Khrushchev X died on the 9th of Tishru ii Ux. Scored &C-1209&y points Survived for 287 turns. Visited 4 zones. j 4 B���k �=== Game summary for &WKant II&y === Game ended Friday, August 21, 2015 at 11:14:45 PM Kant II died on the 28th of Ubu Ut. The snapjaw hunter&y hits &r(x3)&y for 16 damage with his &wbronze&y two-handed sword ->&y4 &r&y1d8&y!&y [13] Scored &C-1214&y points Survived for 145 turns. Visited 4 zones. k 5 "���l �=== Game summary for &WNietzsche II&y === Game ended Tuesday, August 04, 2015 at 8:25:57 PM Nietzsche II died on the 9th of Simmun Ut. The &rbloody&y &gjilted lover&y hits &W(x2)&y for 3 damage with his thorns ->&y5 &r&y1d4&y!&y [19] Scored &C-1246&y points Survived for 136 turns. Visited 3 zones. l 6 ���m �=== Game summary for &WKant III&y === Game ended Friday, August 21, 2015 at 11:25:01 PM Kant III died on the 13th of Kisu Ux. from bleeding! Scored &C-1252&y points Survived for 105 turns. Visited 3 zones. m 7 ���n �=== Game summary for &WGoethe &y === Game ended Sunday, August 09, 2015 at 7:43:13 PM Goethe died on the 22nd of Tuum Ut. The &rbloody&y boar&y hits &W(x2)&y for 6 damage with his bite ->&y7 &r&y1d3&y!&y [12] Scored &C-1253&y points Survived for 121 turns. Visited 3 zones. n 8 ����o �=== Game summary for &WMalenkov&y === Game ended Sunday, August 02, 2015 at 1:34:01 PM Malenkov died on the 9th of Tishru ii Ux. from &ctraipsing mortar&y's explosion! Scored &C-1318&y points Survived for 130 turns. Visited 5 zones. o 9 ����p �=== Game summary for &WKhrushchev III&y === Game ended Sunday, August 02, 2015 at 4:19:46 PM Khrushchev III died on the 1st of Nivvun Ut. from the scalding steam! Scored &C-1351&y points Survived for 324 turns. Visited 4 zones. p : U���q �=== Game summary for &W &y === Game ended Friday, August 21, 2015 at 11:25:56 PM died on the 8th of Nivvun Ut. from Warden Ualraig&y's Freezes! Scored &C-1451&y points Survived for 19 turns. Visited 1 zone. q ; ����r �=== Game summary for &WNapoleon&y === Game ended Monday, August 03, 2015 at 3:23:01 PM Napoleon died on the 18th of Tuum Ut. Abandoned all hope. Scored &C-1588&y points Survived for 95 turns. Visited 1 zone. r
There is still a number of symbols that can not be read. I have found that the following two blocks work in getting rid of these. If anyone has any better solution please suggest it.
import codecs
qud = codecs.open("HighScores.txt", encoding='latin-1') #open and encode as latin-1
clean_qud = open("HighScores_clean.txt", "w") #open file to save to
for line in qud:
line = line.encode('utf8')
line = line.decode('unicode_escape').encode('ascii','ignore')
clean_qud.write(line)
clean_qud.close()
If you open both HighScores.txt and HighScores_clean.txt you will see that a number of the unreadable symbols have been removed and that the clean text is now much more readable.
Next, the real cleaning begins. This will be done in two major steps. First I will completely remove all unreadable text and save this as a human readable file. Then I will use this cleaned text to create a file which will fill in missing values and add seperators between each "column" so it can be read into pandas.
For the first step a list of tags will have to be removed such as &y, &r etc. These tags seem to determine the color of the next word or symbol on the highscores screen and all need to be removed. Also, sometimes a highscore does not contain a description of how the character died. We need to be able to determine between a blank line where this description should be and a blank line which occurs between highscores.
import re
#list of text to remove.
remove_list = ["&W", "&y", "&w", "&r", "&M", "&Y", "&C", "&c", "&b", "&B", "&K", "&R", "&W", "&G", "&g", "\r", "\n", "\t"]
cleaned_qud = open("Cleaned_Qud_HighScores.txt", "w") #file to write to
clean_highscores = open("HighScores_clean.txt", "r")
#flag which will be used to determine if there is a blank line in the data instead of a line describing how the character died.
#this represents if we have reached a line that says "Visited x Zones" which is always present and always occurs after the character death description
visited = False
#flag which will be used to determine if this is the first line in the file
first_line = True
for line in clean_highscores.readlines():
line = line.replace("`", "'").replace("\n", " ").strip() #some lines have a different ' which was causing havoc! Remove all linebreaks, strip away all whitespace
for remove_word in remove_list:
line = line.replace(remove_word, "") #go down through all words in the remove list and replace them with ""
if "===" in line: #check if this is the first line of a highscore (===Game summary for )
visited = False #set the visited variable to false
qud_search = re.search("=== ((\w*\'*\w*\s*)*) ===", line) #pull out everything between === and ===
if first_line == True:
line = str(qud_search.group(1))
first_line = False
else:
line = "\n" + str(qud_search.group(1)) #if this is the first line in the file write as is, otherwise put a \n at the start. Prevents a blank line at the start of the file
if len(line) == 0 and visited == False: #if a line is blank and we haven't hit the end of the highscore this is where a death description should be
line = "blank"
if "Visited" in line:
visited = True #set to true to indicate we have passed the death description. Blank lines after this will be striped out
#Even after all the cleaning some unwanted symbols were still getting through. The following line works, but is messy. But works. Did I mention it works?...well, it works so far...
#If we have passed the death description (visited == True) any file striped of ALL spaces, even those between words, that is less than 10 letters can be assumed to be trash that has made it through the cleaning process. Delete.
if visited == True:
if len(line.replace(" ", "")) < 10:
#continue
print line #print out the line
cleaned_qud.write(line + "\n") #write the line
cleaned_qud.close()
Game summary for Goethe II Game ended Thursday, August 13, 2015 at 6:04:58 PM Goethe II died on the 20th of Uru Ux. from Wahmahcalcalit's lase beam! (x2) Scored 48753 points Survived for 35235 turns. Visited 260 zones. Generated 1 storied items. Most advanced artifact in possession: HE Missile Game summary for Kant XVIII Game ended Sunday, August 30, 2015 at 7:34:00 PM Kant XVIII died on the 27th of Tuum Ut. The chute crab hits (x1) for 2 damage with his crab claw ->7 1d2! [7] Scored 40178 points Survived for 37145 turns. Visited 222 zones. Generated 1 storied items. Most advanced artifact in possession: Fix-It spray foam x2 Game summary for O'Brien III Game ended Wednesday, September 02, 2015 at 3:50:10 AM O'Brien III died on the 6th of Tebet Ux. The bloody Kumukokumu the Stylish, legendary ogre ape hits (x8) for 51 damage with his ape fist ->20 3d3! [10] Scored 20556 points Survived for 21114 turns. Visited 130 zones. Most advanced artifact in possession: force bracelet 0 0 <> [no cell] Game summary for Kant XII Game ended Friday, August 28, 2015 at 11:14:48 PM Kant XII died on the 7th of Iyur Ut. Putus Templar warden hits (x1) for 3 damage with his folded carbide long sword ->9 2d5! [20] Scored 17061 points Survived for 17066 turns. Visited 118 zones. Most advanced artifact in possession: electrobow <> ->10 1d6 [no cell] Game summary for Nietzsche III Game ended Wednesday, August 05, 2015 at 8:00:46 PM Nietzsche III died on the 19th of Tishru ii Ux. The eyeless king crab hits (x6) for 20 damage with his massive king crab claw ->20 1d6! [11] Scored 16607 points Survived for 16124 turns. Visited 115 zones. Most advanced artifact in possession: ubernostrum injector <> Game summary for Kant XI Game ended Thursday, August 27, 2015 at 11:14:09 PM Kant XI died on the 12th of Uru Ux. from the scalding steam! Scored 9971 points Survived for 11105 turns. Visited 60 zones. Most advanced artifact in possession: Fix-It spray foam Game summary for Kant VIII Game ended Thursday, August 27, 2015 at 8:01:17 PM Kant VIII died on the 23rd of Tishru i Ux. from the scalding steam! Scored 7848 points Survived for 7719 turns. Visited 35 zones. Most advanced artifact in possession: Fix-It spray foam Game summary for Kant V Game ended Saturday, August 22, 2015 at 6:22:36 PM Kant V died on the 28th of Tishru i Ux. blank Scored 6662 points Survived for 8118 turns. Visited 47 zones. Most advanced artifact in possession: semi-automatic pistol x2 <> ->8 1d6 [Empty] Game summary for O'Brien II Game ended Wednesday, September 02, 2015 at 12:53:32 AM O'Brien II died on the 23rd of Nivvun Ut. from Duhmahcaluhcal's lase beam! (x3) Scored 5471 points Survived for 6356 turns. Visited 42 zones. Most advanced artifact in possession: stun gas grenade mk I Game summary for Kant XVII Game ended Saturday, August 29, 2015 at 1:44:21 AM Kant XVII died on the 27th of Tishru ii Ux. blank Scored 3169 points Survived for 7239 turns. Visited 37 zones. Most advanced artifact in possession: compass bracelet 0 0 Game summary for Kant Game ended Friday, August 21, 2015 at 11:08:22 PM Kant died on the 12th of Tuum Ut. The giant amoeba hits (x2) for 4 damage with his giant pseudopod ->10 1d3! [15] Scored 2372 points Survived for 3013 turns. Visited 21 zones. Game summary for Kant XIII Game ended Saturday, August 29, 2015 at 12:05:24 AM Kant XIII died on the 5th of Tebet Ux. The girshling hits (x1) for 6 damage with his claw ->2 1d6! [12] Scored 1849 points Survived for 2853 turns. Visited 18 zones. Most advanced artifact in possession: pump shotgun ->8 1d2 [shotgun shell] Game summary for Khrushchev VIII Game ended Sunday, August 02, 2015 at 6:19:47 PM Khrushchev VIII died on the 5th of Tuum Ut. from bleeding! Scored 1760 points Survived for 4198 turns. Visited 25 zones. Game summary for Nietzsche Game ended Tuesday, August 04, 2015 at 8:18:00 PM Nietzsche died on the 17th of Tuum Ut. The bloody horned chameleon hits (x1) for 4 damage with his Tusks ->4 2d3 0 0! [7] Scored 1503 points Survived for 3719 turns. Visited 27 zones. Game summary for Kant IV Game ended Saturday, August 22, 2015 at 12:00:38 AM Kant IV died on the 28th of Iyur Ut. The snapjaw scavenger hits (x1) for 6 damage with his steel battle axe ->3 1d6! [18] Scored 1393 points Survived for 3347 turns. Visited 16 zones. Most advanced artifact in possession: acid gas grenade mk I Game summary for Khrushchev XI Game ended Monday, August 03, 2015 at 3:18:32 PM Khrushchev XI died on the 20th of Kisu Ux. blank Scored 1136 points Survived for 4121 turns. Visited 21 zones. Most advanced artifact in possession: blaze injector Game summary for Lenin Game ended Saturday, August 01, 2015 at 4:08:30 PM Lenin died on the 13th of Iyur Ut. The equimax hits (x3) for 9 damage with his bite ->8 2d2! [17] Scored 902 points Survived for 1019 turns. Visited 12 zones. Game summary for Khrushchev Game ended Sunday, August 02, 2015 at 3:52:52 PM Khrushchev died on the 10th of Tishru ii Ux. The bloody Groubuubu-wof-wofuz, the stalwart Snapjaw Tot-eater hits (x2) for 11 damage with his carbide battle axe ->5 2d3! [22] Scored 708 points Survived for 2789 turns. Visited 21 zones. Game summary for Kant X Game ended Thursday, August 27, 2015 at 9:17:34 PM Kant X died on the 8th of Kisu Ux. The cave spider hits (x1) for 2 damage with his fangs ->2 1d2! [19] Scored 265 points Survived for 2287 turns. Visited 16 zones. Game summary for O'Brien IV Game ended Wednesday, September 02, 2015 at 12:47:21 PM O'Brien IV died on the Ides of Uru Ux. The salthopper hits (x3) for 7 damage with his rending mandibles ->11 1d4! [15] Scored 199 points Survived for 1810 turns. Visited 14 zones. Most advanced artifact in possession: semi-automatic pistol ->8 1d6 [Empty] Game summary for Khrushchev II Game ended Sunday, August 02, 2015 at 4:13:32 PM Khrushchev II died on the 17th of Uru Ux. from bleeding! Scored 13 points Survived for 1640 turns. Visited 9 zones. Game summary for Stalin Game ended Saturday, August 01, 2015 at 3:28:05 PM Stalin died on the 27th of Uru Ux. The salthopper hits (x3) for 9 damage with his rending mandibles ->11 1d4! [16] Scored -71 points Survived for 3412 turns. Visited 30 zones. Game summary for Kant IX Game ended Thursday, August 27, 2015 at 8:51:15 PM Kant IX died on the 2nd of Iyur Ut. The jilted lover hits (x1) for 2 damage with his thorns ->5 1d4! [16] Scored -80 points Survived for 1807 turns. Visited 13 zones. Most advanced artifact in possession: acid gas grenade mk I x2 Game summary for Khrushchev VI Game ended Sunday, August 02, 2015 at 5:12:49 PM Khrushchev VI died on the 11th of Tuum Ut. from fire ant's flames! Scored -126 points Survived for 1705 turns. Visited 21 zones. Game summary for Stalin Game ended Saturday, August 01, 2015 at 3:41:26 PM Stalin died on the 1st of Tishru i Ux. from the explosion! Scored -224 points Survived for 1061 turns. Visited 8 zones. Game summary for Kant VII Game ended Thursday, August 27, 2015 at 4:50:50 PM Kant VII died on the 22nd of Uulu Ut. blank Scored -243 points Survived for 770 turns. Visited 8 zones. Game summary for Kant XIV Game ended Saturday, August 29, 2015 at 12:23:09 AM Kant XIV died on the 29th of Tuum Ut. from bleeding! Scored -367 points Survived for 2230 turns. Visited 14 zones. Game summary for Kant XV Game ended Saturday, August 29, 2015 at 12:42:44 AM Kant XV died on the 24th of Nivvun Ut. blank Scored -434 points Survived for 1332 turns. Visited 10 zones. Game summary for Khrushchev Game ended Sunday, August 02, 2015 at 2:13:37 PM Khrushchev died on the 13th of Uru Ux. from bleeding! Scored -531 points Survived for 1863 turns. Visited 17 zones. Game summary for Napolen III Game ended Monday, August 03, 2015 at 4:20:16 PM Napolen III died on the 20th of Shwut Ux. from the fire started by dawnglider! Scored -543 points Survived for 1773 turns. Visited 16 zones. Game summary for Napoleon Game ended Monday, August 03, 2015 at 3:41:37 PM Napoleon died on the 19th of Uulu Ut. from bleeding! Scored -547 points Survived for 1536 turns. Visited 11 zones. Game summary for Napoleon II Game ended Monday, August 03, 2015 at 3:57:39 PM Napoleon II died on the 22nd of Tishru i Ux. from bleeding! Scored -590 points Survived for 1298 turns. Visited 11 zones. Game summary for O'Brien V Game ended Wednesday, September 02, 2015 at 12:58:51 PM O'Brien V died on the 17th of Nivvun Ut. blank Scored -618 points Survived for 1538 turns. Visited 14 zones. Game summary for Kant VI Game ended Thursday, August 27, 2015 at 4:36:27 PM Kant VI died on the 14th of Shwut Ux. from young ivory's impalement. Scored -911 points Survived for 613 turns. Visited 7 zones. Game summary for Khrushchev V Game ended Sunday, August 02, 2015 at 4:45:07 PM Khrushchev V died on the 19th of Uulu Ut. The bloody salthopper hits (x4) for 10 damage with his rending mandibles ->10 1d4! [8] Scored -918 points Survived for 510 turns. Visited 6 zones. Game summary for Khrushchev IV Game ended Sunday, August 02, 2015 at 4:35:26 PM Khrushchev IV died on the 21st of Nivvun Ut. The snapjaw scavenger hits (x1) for 1 damage with his iron dagger ->2 1d4! [8] Scored -936 points Survived for 1134 turns. Visited 12 zones. Game summary for Kant II Game ended Friday, August 21, 2015 at 11:23:56 PM Kant II died on the 12th of Shwut Ux. The scrap shoveler hits (x5) for 8 damage with his scrap shovel ->15 1d2! [5] Scored -986 points Survived for 720 turns. Visited 6 zones. Game summary for Malenkov Game ended Saturday, August 01, 2015 at 4:35:17 PM Malenkov died on the 14th of Tuum Ut. from snapjaw scavenger's explosion! Scored -1004 points Survived for 911 turns. Visited 12 zones. Game summary for Kant XVI Game ended Saturday, August 29, 2015 at 12:46:03 AM Kant XVI died on the 3rd of Uulu Ut. The bloody equimax hits (x2) for 5 damage with his bite ->9 2d2! [23] Scored -1120 points Survived for 401 turns. Visited 5 zones. Game summary for Khrushchev VII Game ended Sunday, August 02, 2015 at 5:17:56 PM Khrushchev VII died on the 27th of Uru Ux. The bloody salamander hits (x1) for 3 damage with his bite ->3 1d3! [8] Scored -1127 points Survived for 403 turns. Visited 5 zones. Game summary for Stalin Game ended Saturday, August 01, 2015 at 2:04:38 PM Stalin died on the 20th of Nivvun Ut. Umchuum hits (x2) for 4 damage with his Umumerchacal! [9] Scored -1131 points Survived for 362 turns. Visited 3 zones. Most advanced artifact in possession: poison gas grenade mk I Game summary for Khrushchev IX Game ended Monday, August 03, 2015 at 1:56:40 PM Khrushchev IX died on the 18th of Tishru i Ux. from bleeding! Scored -1143 points Survived for 336 turns. Visited 4 zones. Game summary for Malenkov Game ended Saturday, August 01, 2015 at 4:18:54 PM Malenkov died on the 13th of Tishru i Ux. Ruf-ohoubub, the stalwart Snapjaw Bear-baiter hits (x2) for 10 damage with his bronze two-handed sword ->4 1d8! [10] Scored -1155 points Survived for 687 turns. Visited 8 zones. Game summary for Napoleon IV Game ended Monday, August 03, 2015 at 4:28:33 PM Napoleon IV died on the 25th of Uulu Ut. The salthopper hits (x2) for 5 damage with his rending mandibles ->10 1d4! [11] Scored -1171 points Survived for 275 turns. Visited 4 zones. Game summary for O'Brien Game ended Wednesday, September 02, 2015 at 12:03:29 AM O'Brien died on the 9th of Nivvun Ut. blank Scored -1174 points Survived for 287 turns. Visited 5 zones. Game summary for Napoleon V Game ended Monday, August 03, 2015 at 4:31:59 PM Napoleon V died on the 22nd of Ubu Ut. from bleeding! Scored -1175 points Survived for 320 turns. Visited 3 zones. Game summary for Khrushchev X Game ended Monday, August 03, 2015 at 1:59:50 PM Khrushchev X died on the 9th of Tishru ii Ux. blank Scored -1209 points Survived for 287 turns. Visited 4 zones. Game summary for Kant II Game ended Friday, August 21, 2015 at 11:14:45 PM Kant II died on the 28th of Ubu Ut. The snapjaw hunter hits (x3) for 16 damage with his bronze two-handed sword ->4 1d8! [13] Scored -1214 points Survived for 145 turns. Visited 4 zones. Game summary for Nietzsche II Game ended Tuesday, August 04, 2015 at 8:25:57 PM Nietzsche II died on the 9th of Simmun Ut. The bloody jilted lover hits (x2) for 3 damage with his thorns ->5 1d4! [19] Scored -1246 points Survived for 136 turns. Visited 3 zones. Game summary for Kant III Game ended Friday, August 21, 2015 at 11:25:01 PM Kant III died on the 13th of Kisu Ux. from bleeding! Scored -1252 points Survived for 105 turns. Visited 3 zones. Game summary for Goethe Game ended Sunday, August 09, 2015 at 7:43:13 PM Goethe died on the 22nd of Tuum Ut. The bloody boar hits (x2) for 6 damage with his bite ->7 1d3! [12] Scored -1253 points Survived for 121 turns. Visited 3 zones. Game summary for Malenkov Game ended Sunday, August 02, 2015 at 1:34:01 PM Malenkov died on the 9th of Tishru ii Ux. from traipsing mortar's explosion! Scored -1318 points Survived for 130 turns. Visited 5 zones. Game summary for Khrushchev III Game ended Sunday, August 02, 2015 at 4:19:46 PM Khrushchev III died on the 1st of Nivvun Ut. from the scalding steam! Scored -1351 points Survived for 324 turns. Visited 4 zones. Game summary for Game ended Friday, August 21, 2015 at 11:25:56 PM died on the 8th of Nivvun Ut. from Warden Ualraig's Freezes! Scored -1451 points Survived for 19 turns. Visited 1 zone. Game summary for Napoleon Game ended Monday, August 03, 2015 at 3:23:01 PM Napoleon died on the 18th of Tuum Ut. Abandoned all hope. Scored -1588 points Survived for 95 turns. Visited 1 zone.
Wow, that was tough and we're still not near Golgotha. This human readable file created above will now be used to create a pandas readable file. This could have all been done in one step but is done in two for my sanity, which I was in danger of losing during the above process and also in the event a user would rather change the below step to clean the file in a different way.
Now we need to delete a lot of the filler text ("Game summary for ", "x died on the " etc) so that we are just left with catagorial (character name, artifact name) or integer values (score, zones).
There is also the issue of uneven or unequal highscore descriptions. Some of them contain data that the others do not. If I found a "storied item" (I remember finding a shield called "Stopslavin") then a row "Generated 1 storied items." will be added. However, if I do not find a storied item then this line will not be there. Same with artifacts. So it is possible that some scores will have (at least) two lines more than other scores and a number of flags are used to check this.
If going through this code using your own highscores data you will more than likely have to make adjustments/additions to the lines determining how the character died.
import re #left behind as I often started the the notebook from this point, content with the cleaning in the above step from earlier
cleaned_qud = open("Cleaned_Qud_HighScores_1.txt", "w")
clean_highscores = open("Cleaned_Qud_HighScores.txt", "r")
first_line = True
name = " "
#flags for checking if storied items or artifacts are present in the highscore
visited = False
generated = False
artifact = False
for line in clean_highscores.readlines():
line = line.replace("`", "'").replace("\n", " ").replace(".", "").strip()
if "summary" in line: #If this is the first line of a highscore
visited = False
generated = False #set all flags to false
artifact = False
line = line.replace("Game summary for ", "") #remove everything but the characters name
name = line #save the characters name to be used in a later deletion ("name died on ")
line = line.strip() #strip blank space. This is from an attempt to parse a line where the character name was " "
if first_line == True:
first_line = False
else:
line = "\n"+str(line) #If this is the first line saved to the file add as is, other wise add a \n to the start
if "Game ended" in line:
line = line.replace("Game ended", "").replace("at", "").strip() #Remove "Game ended", leaving behind only the date
if "died on" in line:
line = line.replace("%s died on the" % name, "").strip() #remove "name died on the " leaving behind only the Game date
#Code to figure out what caused the players death
if " hits (" in line:
#The chute crab hits (x1) for 2 damage with his crab claw ->7 1d2! [7]
if "->" in line:
death_search = re.search("((\w*\,?\-?\s*)+) hits \(x(\d*)\) for (\d*) damage with \w{3} ((\w*\,?\-?\s*)+) ->(\d+) (\d*d\d*)!?", line.replace("The", "").replace("bloody", "").strip())
#name, times hit, damage, weapon, PV, pos damage
line = str(death_search.group(1)) + "\t" + str(death_search.group(3)) + "\t" + str(death_search.group(4)) + "\t" + str(death_search.group(5)) + "\t" + str(death_search.group(7)) + "\t" + str(death_search.group(8))
else:
#Umchuum hits (x2) for 4 damage with his Umumerchacal! [9]
death_search = re.search("((\w*\,?\-?\s*)+) hits \(x(\d*)\) for (\d*) damage with \w{3} ((\w*\,?\-?\s*)+)!?", line.replace("The", "").replace("bloody", "").strip())
#name, times hit, damage, weapon, PV, pos damage
line = str(death_search.group(1)) + "\t" + str(death_search.group(3)) + "\t" + str(death_search.group(4)) + "\t" + str(death_search.group(5)) + "\t0" + "\t0"
if "blank" in line:
line = "unknown\t0\t0\tunknown\t0\t0"
#lines that contain 'from' are generally short descriptions. A more effective regex could be written at a later time.
if "from" in line:
if line.strip() == "from bleeding!":
line = "bleeding\t0\t0\tbleeding\t0\t0"
elif line.strip() == "from the scalding steam!":
line = "scalding steam\t0\t0\tscalding steam\t0\t0"
elif line.strip() == "from the explosion!":
line = "explosion\t0\t0\texplosion\t0\t0"
elif "from the fire started by" in line:
foe = line.replace("from the fire started by ", "").strip("!").strip()
line = "%s\t0\t0\tfire\t0\t0" % foe
elif "'s" in line:
#from Wahmahcalcalit's lase beam!
death_search = re.search("from ((\w*\,?\-?\s*)*(\w*\,?\-?(\'s){1}\s*)) ((\w*\,?\-?(\'s){0}\s*)+)", line)
line = "%s\t0\t0\t%s\t0\t0\t" % (str(death_search.group(1).strip("'s'")), str(death_search.group(5)))
if line.strip() == "Abandoned all hope":
line = "quit\t0\t0\tquit\t0\t0"
if "Scored" in line:
line = line.replace("Scored", "").replace("points", "").strip() #remove all bar the points figure
if "Survived " in line:
line = line.replace("Survived for", "").replace("turns", "").strip() #remove all bar the turns figure
if "Visited " in line:
visited = True #set visited flag to true
line = line.replace("Visited", "").replace("zones", "").replace("zone", "").strip() #remove all bar the zones figure
if "Generated" in line:
generated = True #set generated flag to true
line = line.replace("Generated", "").replace("storied items", "").strip() #remove all bar the storied items figure
if "Most advanced artifact" in line:
artifact = True #set artifact flag to true
gen_check = "" #create a string for checking if a storied items figure exists
if generated == False:
gen_check = "0\t"
generated = True
line = gen_check + str(line.replace("Most advanced artifact in possession:", "").strip())
#if there is an artifact but no storied item this will read "0\t" + artifactname. If there is a storied item this will be "" + artifactname
if len(line) == 0 and visited == True: #if we are on a blank line and we have passed the visited line this will add "0 no artifact" to the end of the line
if generated == False:
line = str(line) + "0\t"
if artifact == False:
line = str(line) + "no artifact\t"
print line
cleaned_qud.write(line + "\t")
cleaned_qud.write("0\tno artifact") #insert into final row
cleaned_qud.close()
Goethe II Thursday, August 13, 2015 6:04:58 PM 20th of Uru Ux Wahmahcalcalit 0 0 lase beam 0 0 48753 35235 260 1 HE Missile Kant XVIII Sunday, August 30, 2015 7:34:00 PM 27th of Tuum Ut chute crab 1 2 crab claw 7 1d2 40178 37145 222 1 Fix-It spray foam x2 O'Brien III Wednesday, September 02, 2015 3:50:10 AM 6th of Tebet Ux Kumukokumu the Stylish, legendary ogre ape 8 51 ape fist 20 3d3 20556 21114 130 0 force bracelet 0 0 <> [no cell] Kant XII Friday, August 28, 2015 11:14:48 PM 7th of Iyur Ut Putus Templar warden 1 3 folded carbide long sword 9 2d5 17061 17066 118 0 electrobow <> ->10 1d6 [no cell] Nietzsche III Wednesday, August 05, 2015 8:00:46 PM 19th of Tishru ii Ux eyeless king crab 6 20 massive king crab claw 20 1d6 16607 16124 115 0 ubernostrum injector <> Kant XI Thursday, August 27, 2015 11:14:09 PM 12th of Uru Ux scalding steam 0 0 scalding steam 0 0 9971 11105 60 0 Fix-It spray foam Kant VIII Thursday, August 27, 2015 8:01:17 PM 23rd of Tishru i Ux scalding steam 0 0 scalding steam 0 0 7848 7719 35 0 Fix-It spray foam Kant V Surday, August 22, 2015 6:22:36 PM 28th of Tishru i Ux unknown 0 0 unknown 0 0 6662 8118 47 0 semi-automatic pistol x2 <> ->8 1d6 [Empty] O'Brien II Wednesday, September 02, 2015 12:53:32 AM 23rd of Nivvun Ut Duhmahcaluhcal 0 0 lase beam 0 0 5471 6356 42 0 stun gas grenade mk I Kant XVII Surday, August 29, 2015 1:44:21 AM 27th of Tishru ii Ux unknown 0 0 unknown 0 0 3169 7239 37 0 compass bracelet 0 0 Kant Friday, August 21, 2015 11:08:22 PM 12th of Tuum Ut giant amoeba 2 4 giant pseudopod 10 1d3 2372 3013 21 0 no artifact Kant XIII Surday, August 29, 2015 12:05:24 AM 5th of Tebet Ux girshling 1 6 claw 2 1d6 1849 2853 18 0 pump shotgun ->8 1d2 [shotgun shell] Khrushchev VIII Sunday, August 02, 2015 6:19:47 PM 5th of Tuum Ut bleeding 0 0 bleeding 0 0 1760 4198 25 0 no artifact Nietzsche Tuesday, August 04, 2015 8:18:00 PM 17th of Tuum Ut horned chameleon 1 4 Tusks 4 2d3 1503 3719 27 0 no artifact Kant IV Surday, August 22, 2015 12:00:38 AM 28th of Iyur Ut snapjaw scavenger 1 6 steel battle axe 3 1d6 1393 3347 16 0 acid gas grenade mk I Khrushchev XI Monday, August 03, 2015 3:18:32 PM Khrushchev XI died on the 20th of Kisu Ux unknown 0 0 unknown 0 0 1136 4121 21 0 blaze injector Lenin Surday, August 01, 2015 4:08:30 PM 13th of Iyur Ut equimax 3 9 bite 8 2d2 902 1019 12 0 no artifact Khrushchev Sunday, August 02, 2015 3:52:52 PM 10th of Tishru ii Ux Groubuubu-wof-wofuz, the stalwart Snapjaw Tot-eater 2 11 carbide battle axe 5 2d3 708 2789 21 0 no artifact Kant X Thursday, August 27, 2015 9:17:34 PM 8th of Kisu Ux cave spider 1 2 fangs 2 1d2 265 2287 16 0 no artifact O'Brien IV Wednesday, September 02, 2015 12:47:21 PM Ides of Uru Ux salthopper 3 7 rending mandibles 11 1d4 199 1810 14 0 semi-automatic pistol ->8 1d6 [Empty] Khrushchev II Sunday, August 02, 2015 4:13:32 PM 17th of Uru Ux bleeding 0 0 bleeding 0 0 13 1640 9 0 no artifact Stalin Surday, August 01, 2015 3:28:05 PM 27th of Uru Ux salthopper 3 9 rending mandibles 11 1d4 -71 3412 30 0 no artifact Kant IX Thursday, August 27, 2015 8:51:15 PM 2nd of Iyur Ut jilted lover 1 2 thorns 5 1d4 -80 1807 13 0 acid gas grenade mk I x2 Khrushchev VI Sunday, August 02, 2015 5:12:49 PM 11th of Tuum Ut fire ant 0 0 flames 0 0 -126 1705 21 0 no artifact Stalin Surday, August 01, 2015 3:41:26 PM 1st of Tishru i Ux explosion 0 0 explosion 0 0 -224 1061 8 0 no artifact Kant VII Thursday, August 27, 2015 4:50:50 PM 22nd of Uulu Ut unknown 0 0 unknown 0 0 -243 770 8 0 no artifact Kant XIV Surday, August 29, 2015 12:23:09 AM 29th of Tuum Ut bleeding 0 0 bleeding 0 0 -367 2230 14 0 no artifact Kant XV Surday, August 29, 2015 12:42:44 AM 24th of Nivvun Ut unknown 0 0 unknown 0 0 -434 1332 10 0 no artifact Khrushchev Sunday, August 02, 2015 2:13:37 PM 13th of Uru Ux bleeding 0 0 bleeding 0 0 -531 1863 17 0 no artifact Napolen III Monday, August 03, 2015 4:20:16 PM 20th of Shwut Ux dawnglider 0 0 fire 0 0 -543 1773 16 0 no artifact Napoleon Monday, August 03, 2015 3:41:37 PM 19th of Uulu Ut bleeding 0 0 bleeding 0 0 -547 1536 11 0 no artifact Napoleon II Monday, August 03, 2015 3:57:39 PM 22nd of Tishru i Ux bleeding 0 0 bleeding 0 0 -590 1298 11 0 no artifact O'Brien V Wednesday, September 02, 2015 12:58:51 PM 17th of Nivvun Ut unknown 0 0 unknown 0 0 -618 1538 14 0 no artifact Kant VI Thursday, August 27, 2015 4:36:27 PM 14th of Shwut Ux young ivory 0 0 impalement 0 0 -911 613 7 0 no artifact Khrushchev V Sunday, August 02, 2015 4:45:07 PM 19th of Uulu Ut salthopper 4 10 rending mandibles 10 1d4 -918 510 6 0 no artifact Khrushchev IV Sunday, August 02, 2015 4:35:26 PM 21st of Nivvun Ut snapjaw scavenger 1 1 iron dagger 2 1d4 -936 1134 12 0 no artifact Kant II Friday, August 21, 2015 11:23:56 PM 12th of Shwut Ux scrap shoveler 5 8 scrap shovel 15 1d2 -986 720 6 0 no artifact Malenkov Surday, August 01, 2015 4:35:17 PM 14th of Tuum Ut napjaw scavenger 0 0 explosion 0 0 -1004 911 12 0 no artifact Kant XVI Surday, August 29, 2015 12:46:03 AM 3rd of Uulu Ut equimax 2 5 bite 9 2d2 -1120 401 5 0 no artifact Khrushchev VII Sunday, August 02, 2015 5:17:56 PM 27th of Uru Ux salamander 1 3 bite 3 1d3 -1127 403 5 0 no artifact Stalin Surday, August 01, 2015 2:04:38 PM 20th of Nivvun Ut Umchuum 2 4 Umumerchacal 0 0 -1131 362 3 0 poison gas grenade mk I Khrushchev IX Monday, August 03, 2015 1:56:40 PM 18th of Tishru i Ux bleeding 0 0 bleeding 0 0 -1143 336 4 0 no artifact Malenkov Surday, August 01, 2015 4:18:54 PM 13th of Tishru i Ux Ruf-ohoubub, the stalwart Snapjaw Bear-baiter 2 10 bronze two-handed sword 4 1d8 -1155 687 8 0 no artifact Napoleon IV Monday, August 03, 2015 4:28:33 PM 25th of Uulu Ut salthopper 2 5 rending mandibles 10 1d4 -1171 275 4 0 no artifact O'Brien Wednesday, September 02, 2015 12:03:29 AM 9th of Nivvun Ut unknown 0 0 unknown 0 0 -1174 287 5 0 no artifact Napoleon V Monday, August 03, 2015 4:31:59 PM 22nd of Ubu Ut bleeding 0 0 bleeding 0 0 -1175 320 3 0 no artifact Khrushchev X Monday, August 03, 2015 1:59:50 PM 9th of Tishru ii Ux unknown 0 0 unknown 0 0 -1209 287 4 0 no artifact Kant II Friday, August 21, 2015 11:14:45 PM 28th of Ubu Ut snapjaw hunter 3 16 bronze two-handed sword 4 1d8 -1214 145 4 0 no artifact Nietzsche II Tuesday, August 04, 2015 8:25:57 PM 9th of Simmun Ut jilted lover 2 3 thorns 5 1d4 -1246 136 3 0 no artifact Kant III Friday, August 21, 2015 11:25:01 PM 13th of Kisu Ux bleeding 0 0 bleeding 0 0 -1252 105 3 0 no artifact Goethe Sunday, August 09, 2015 7:43:13 PM Goethe died on the 22nd of Tuum Ut boar 2 6 bite 7 1d3 -1253 121 3 0 no artifact Malenkov Sunday, August 02, 2015 1:34:01 PM 9th of Tishru ii Ux traipsing mortar 0 0 explosion 0 0 -1318 130 5 0 no artifact Khrushchev III Sunday, August 02, 2015 4:19:46 PM 1st of Nivvun Ut scalding steam 0 0 scalding steam 0 0 -1351 324 4 0 no artifact Game summary for Friday, August 21, 2015 11:25:56 PM died on the 8th of Nivvun Ut Warden Ualraig 0 0 Freezes 0 0 -1451 19 1 0 no artifact Napoleon Monday, August 03, 2015 3:23:01 PM 18th of Tuum Ut quit 0 0 quit 0 0 -1588 95 1
The text is now cleaned and can be read into a pandas dataframe. The above code works with my current highscores but a lot of work would need to be done to make it compatiable with other players highscores. There are many ways to die in Qud and my parsing only takes into consideration the few ways my characters have died. I am sure there are many ways to break the above code and I would greatly appreciate any suggestions or improvements.